﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>@ViewBag.Title @ViewBag.IsAuthenticated - SoftRoad</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="~/Content/css/layui.css" rel="stylesheet" />
    <link href="~/Content/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/Content/css/global.css" rel="stylesheet" />
</head>
<body>
    <div class="header">
        <div class="main">
            <a class="logo" href="/" title="SoftRoad">SoftRoad开发四部</a>
            <div class="nav">
                <a class="nav-this" href="#">
                    <i class="fa fa-question-circle"></i>问答
                </a>
                <a class="=nav-this" href="@Url.Action("Index","Project")">
                    <i class="fa fa-book"></i>项目
                </a> 
                <a class="=nav-this" href="http://192.168.7.25:8080/">
                    <i class="fa fa fa-file"></i>文件
                </a>
                <a class="=nav-this" href="@Url.Action("Index","Skill")">
                    <i class="fa fa-desktop"></i>技术
                </a>
                <a class="nav-this" href="@Url.Action("Index","Count")">
                    <i class="fa fa-tasks"></i>统计
                </a>
            </div>
            <div class="nav-user">
                @if (!HttpContext.Current.User.Identity.IsAuthenticated)
                {
                    <!-- 未登入状态 -->
                    <div class="nav">
                        <a href="@Url.Action("Login","Account")"><i class="layui-icon layui-icon-friends"></i>登录</a>
                        <a href="@Url.Action("Register","Account")"><i class="layui-icon layui-icon-form"></i>注册</a>
                    </div>
                }
                else
                {
                    <!-- 登入后的状态 -->
                    Html.RenderAction("HeaderForLogIn");
                    <div class="nav">
                        <a href="@Url.Action("Set","Account")"><i class="layui-icon layui-icon-set-fill"></i>设置</a>
                        <a href="@Url.Action("LogOut","Account")"><i class="layui-icon layui-icon-logout"></i>退出</a>
                    </div>
                }
            </div>
        </div>
    </div>
    <div>
        @RenderBody()
    </div>

    <div class="footer">
        <p>
            <span>开发四部（SoftRoad） &copy; @DateTime.Now.Year  </span>
        </p>
    </div>
    <script src="~/Content/layui.js"></script>
    <script src="~/Content/jquery-3.4.1.min.js"></script>
    <script src="~/Content/com.js"></script>
    <script>
        layui.cache.page = location.pathname.split('/')[1].toLowerCase();
        var $uesr = layui.data('user').user;
        layui.cache.user = $uesr !== undefined &&'@HttpContext.Current.User.Identity.IsAuthenticated'==='True' ? $uesr : {
            username: '游客'
            , uid: -1
            , avatar: '../Content/images/default.png'
            , experience: 83
            , sex: '男'
        };

        layui.config({
             base: '../Content/mods/'
        }).use(['common','layer'], function () {
            var common = layui.common,
                $ = layui.jquery;
            //layer.msg('加载中...', { icon: 16, shade: 0.7, time: 1000 });
            //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
            $('.detail-body').each(function () {
                var othis = $(this), html = othis.html();
                othis.html(common.content(html));
            });
        });
    </script>
    @RenderSection("scripts", false)
</body>
</html>
